1. Field of the Invention
This invention relates generally to controllers for games and simulator programs implemented on a personal computer ("PC") and, more particularly, to bi-directional controller drivers having the capability of receiving transmitted digital controller data to the PC game port responsive to a PC microprocessor instruction.
2. Description of the Related Art
The PC has been through a good deal of change and evolution since its initial introduction. However, in some areas, the PC has changed little. One such area is the way in which the PC interfaces to external devices. Countless add-in cards and interfaces have been developed but, with few exceptions, these new add-in cards and interfaces have not become standard to the basic PC. The standard peripheral interfaces typically found on all new PCs are the parallel interface (printer interface), serial interface(s), the game board interface, the keyboard port, and sound card interface. Bi-directional communication between the host PC and external devices has generally been restricted to the serial interface(s). The parallel interface is notably not truly a bi-directional interface. The keyboard port has also been adopted for bi-directional communications (See U.S. Pat. Nos. 5,396,267 and 5,610,631; see also U.S. Pat. No. 4,824,111 to Hoye, et al.) but does not provide a truly bi-directional interface.
One problem with the current system is that the primary bi-directional interface, the serial interface, has speed limitations and is typically dedicated to other external devices such as the printers. When not dedicated to the system printer, the serial interface is in constant use by modems, faxes, scanners, mouse, and the like. Therefore, the serial interface has not been readily available to support game controllers.
Conventionally, a PC is enabled to be controlled by external manual control devices by means of a game board or card, which provides an external game port into which control devices, such as joysticks, rudders, hand-held game controllers and the like, can be plugged. Widespread compatibility is essential to the ability to mass market a wide variety of games and simulation programs.
Industry standards have been developed for game cards for personal computers such as those commonly referred to as IBM-compatibles. The universal adoption of these standards means that any external manual input device designed to control such computers and software must be compatible with the industry-standard game port. Any input device lacking such compatibility will not be able to be used to interface with conventional personal computers through standard game boards and will not be widely accepted.
One problem is that the industry standard game port provides only a limited number of inputs: four discrete signal inputs for receiving discrete signals signifying "On" and "Off" and four analog signal inputs for receiving variable voltage signals, such as output by a potentiometer, which are continuously variable over a limited range. The number of game boards that could be plugged into a conventional PC was also limited. A multiport game card is disclosed in commonly assigned U.S. Pat. No. 5,245,320 to Bouton. Consequently, the number of controllers supported by a standard game port, and the number of allowable functions communicated thereby, is severely restricted.
Additionally, the game card or board has been typically thought of as an input only device, that is, not having the capability of communication to and from the external device.
The industry-standard game port is a very simple, somewhat primitive, interface, especially in how it handles the analog inputs. The game port appears to the host PC, more particularly to the PC microprocessor, as an Input/Output ("I/O") address. The microprocessor communicates with I/O interfaces, like the game port, by sending instructions to the address assigned to the particular I/O device. A single I/O interface may have two or more ports, each port will have an individual address assigned.
The first game port will usually be assigned an address 0201 hex (base 16) or 513 decimal. To access the game card to read a button, for instance, the microprocessor performs an I/O READ from address 201h. The result is an 8-bit value where each of the 4 buttons is assigned a single bit. When a button is pressed on the game controller, a contact closure to ground is applied on the game port at a pin on the connector that corresponds to the button input to the game port. A logic low voltage at the input pin and at the corresponding bit indicates that the button has been pressed.
The byte read from the game port is typically configured as follows:
BIT 7 6 5 4 3 2 1 0 But4 But3 But2 But1 Y2 X2 Y1 X1 Where: But4 indicates button 4; But3 indicates button 3; But2 indicates button 2; But1 indicates button 1; X1 indicates forst X analog position; Y1 indicates first Y analog position; X2 indicates seconds X analog position; and Y2 indicates second Y analog position.
For example, if the 8 bit value read from the game port is 11100000, the button pressed was button 1. You may notice that the analog positional values X1, Y1, X2, and Y2 are also represented by a single bit in this example. This is not the value of the analog input but rather a flag.
Reading an analog positional value is not as simple as reading a button value. U.S. Pat. No. 5,245,320 to Bouton, incorporated herein by reference, describes and illustrates the conventional game controller coupled to the game port. The analog positional values must be read by first causing the microprocessor to write to the address 201h by issuing a WRITE, 201h instruction. This instruction causes a monostable multivibrator or one-shot to fire an output voltage pulse which charges up to power supply voltage VCC. The width of the resulting pulse will be proportional to the resistance of the external device connected to the game port. The resistance of the external device will, in turn, be proportional to the position of the controller in one axis, the X axis, for example. This is because the output of the one-shot is presented to a capacitive load located on the game port and a resistive load located on the controller. Game controllers, for instance a joystick, have a potentiometer in both the X and Y axis. The resistive value of both of these potentiometers reflects the position of the joystick in the respective axis. The one-shot drives the analog line high and the time that the line stays high is a function of the time it takes for the capacitive value of the game port to charge through the device resistance. The RC-time constant, comprising the capacitive load of the game port and the resistive load of the joystick or controller, defines the width of the pulse. The PC microprocessor must then turn this pulse width value into a value that reflects the device position capable of use in games and other programs. Typically, this conversion is accomplished by using a counter timer. When the microprocessor writes to address 201h, a timer coupled to the one-shot is started. The timer is stopped when the output voltage pulse from the one-shot finally goes low. The timer ending count is proportional to the RC-time constant, and therefore indicative of the value of resistance and controller position.
A drawback is that the characteristics of the analog inputs can vary significantly from machine to machine. Game developers have attempted to circumvent this problem by providing calibration functions that normalize the game port inputs. These calibration functions will read the analog inputs for the extremes of travel of the respective external controller and, interactively with the user, assign values to these points. These assigned values are then used by the driver running on the host PC to scale and offset the raw analog input values read from the external controller. Additionally, since there are four analog inputs to be read, the microprocessor must divide its time between the four inputs. During the polling of the four inputs, the microprocessor typically masks service interrupts from other systems within the PC in order to eliminate deviation in position accuracy.
Attempting to address these and other limitations of the conventional game board, game developers have used the four discrete signal inputs and the four analog inputs in a variety of creative ways. One such way is described in U.S. Pat. No. 5,389,950 to Bouton, one of the present inventors, incorporated herein by reference. This patent describes a video game controller for inputting command signals to a game port having a finite number of discrete and analog signal inputs and providing a plurality of additional discrete outputs multiplexed on one of the analog outputs. The controller has a plurality of switches each coupled to the one analog output via a different value resistance. Circuitry in the game board in combination with programming in the computer game or simulation software recognizes discrete voltage levels input from the controller via the one analog port as different discrete commands. This enables the range of commands that can be input from a video game controller to be substantially increased without making any change to the base computer software. A similar method is described in U.S. Pat. No. 5,459,487 to the aforementioned inventor, incorporated herein by reference.
U.S. Pat. No. 5,593,350 to Bouton, et al., incorporated herein by reference, describes a high precision game card that generates a digital signal corresponding to each analog input signal from a controller. Each digital signal has a digital value proportional to the number of "reads" (READ instructions) to the game card by the PC microprocessor. The digital signals can therefore be read by the computer without disabling the computer interrupts. The game card converts the analog input signals to a corresponding numeric value and this value is compared with an output of a counter which counts the number of "reads" by the computer. If the number of "reads" equals or exceeds the numeric representation, the corresponding digital signal is deasserted. The digital signals are initially asserted responsive to a "write" (WRITE instruction) to the game card by the computer microprocessor. Alternatively, the numeric representations can be provided directly to the computer over the computer data bus. This embodiment provides all of the numeric representations over a single address.
Yet another example of novel ways in which the conventional game board interface has been used is disclosed in U.S. Pat. No. 5,245,320 again to the aforementioned inventor, incorporated herein by reference. In this invention, the game port provides support for at least two multi-functional game controllers via a single PC I/O bus connector. An address decoder selectively enables one of the game controllers in order to access the control input received therefrom. A program operating in the personal computer polls separate addresses within the game controller address space to receive input information from the different controllers. Jumper blocks map each of the plurality of controllers to separate and distinct addresses, in order to avoid address conflicts and provide flexibility.
U.S. Pat. No. 5,551,701 to Bouton, et al., incorporate herein by reference, describes yet another example of a video game system. The computer game control system in a PC with a game port and keyboard port includes a joystick. The joystick is connectable to both the game port and the keyboard port of the PC. The throttle and joystick controller inputs are reconfigurable to work with different video game programs by downloading a new set of keycodes from the personal computer via the keyboard port to a microcontroller and non-volatile memory in the throttle controller. The throttle and joystick controller have variable inputs which can be input to the PC in either analog or digital form. The digital inputs can be calibrated by changing their corresponding keycodes.
These are and other developments have been implemented by the present inventors in several commercially available products, including the F-16 FLCS.TM. Flight Control System game controller ("FCS"). The FCS controller includes analog circuitry mounted on a printed circuit assembly that completes the charging circuit found on the game board. The timer and charging circuit found on the game port is activated by the PC microprocessor by a WRITE, 201h instruction, as explained above. Once a charging cycle has begun, other circuitry on the board detects a predetermined charge level on this analog circuitry. The FCS responds to the detection of a predetermined charge level by processing data and transmitting the processed data back to the PC microprocessor via the keyboard port.
Other examples of novel embodiments of the game port interface exist, including those disclosed in U.S. Pat. No. 5,396,267 to Bouton and U.S. Pat. No. 5,610,631 to Bouton, et al., both incorporated herein by reference. Unfortunately, the aforementioned attempts to expand game port functionality have failed to fully address the limitations inherent in the conventional game board.
As games and simulations become more complex and sophisticated, game operators not only desire more game controller functions but more flexibility to configure controller functions to fit their individual playing style. Especially, there is a need for many more configurable discrete or binary control inputs. The existing discrete or binary input capabilities of a conventional game port, even augmented by a keyboard port input device, does not permit the implementation of such a wide range of control inputs.
Existing game controllers have not provided much improvement or simplification in the configuration of the game input devices or expansion of the number of external devices supported. Moreover, the primitive manner in which the analog inputs are handled by the game port leads to variations in controller characteristics from machine to machine, as mentioned above. A related drawback is that a significant amount of microprocessor or driver time is spent in determining the position of the controller.
The advent of the Universal Serial Bus ("USB") might one day bypass these problems by increasing the number of bi-directional serial I/O ports on a PC, but that capability is not readily available as yet. Moreover, USB cannot readily be implemented on tens of millions of PCs now in use which rely on a game port as the primary interface of joysticks and other game controllers to PCs.
Accordingly, a need remains for a bi-directional game/simulation system including a game controller that allows inputting a plurality of external user-actuable control signals to a driver and subsequently to a video game or simulation program running on a PC via a conventional PC game port responsive to PC microprocessor commands.